pub fn dp_rec_mc(amount: u32) -> u32 {
    const COINS: [u32; 8] = [1, 2, 5, 10, 20, 30, 50, 100];
    let mut dp = vec![0; amount as usize + 1];

    for i in 1..=amount {
        let min = COINS
            .into_iter()
            .map_while(|coin| i.checked_sub(coin))
            .map(|delta| dp[delta as usize] + 1)
            .min();
        dp[i as usize] = min.expect("No solution found");
    }

    dp[amount as usize]
}
